﻿using Quartz.Impl;
using Quartz.Spi;
using Quartz;

namespace quartz_service.JobModels
{
    public static class QuartzConfig
    {
        public static void AddQuartz(this IServiceCollection services)
        {
            services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>();
            services.AddSingleton<IJobFactory, QuartzJobFactory>();
            services.AddSingleton<IHostedService, QuartzHostedService>();
        }
    }
}
